Copyright: DGroup Copyright DameWare Development 1998
Citation: DameWare Development 1998


 DGroup Help Index

Properties	Methods

DGroup Custom Control

Description:

DameWare Group ActiveX component is a 32-bit custom control for use with Visual Basic, Visual C++, Windows Scripting Host and Web pages or any environment that can host ActiveX controls.  DameWare Group enables Windows NT Global Group and User security administration functionality from within your application and HTML/Active Server Pages (ASP) web pages.  Administration functions include add/delete functionality for Windows NT Global Groups, add/delete functionality for user members within the group(s), user lookup to determine group membership and specific user connection/disconnection capability.  Ideal for remote administration implementations for Help Desks, Internet Service Providers (ISP) and others.

Note: DameWare Group is designed to run on Windows NT only.

The DameWare Group ActiveX control utilizes the ActiveX Template Library (ATL), which reduces dependencies on other library files.  Additional information on the ATL is available on our web site at: http://www.dameware.com/faq.htm

Registration:

How to register

What do I get when I register

License

Copyright

Installation and Support:

Installation

Technical Support

Using within a Web page


Technical Support

Technical Support is provided in any of the following ways for your convenience:

•  If possible, we prefer that you use e-mail to communicate with us. Because we check e-mail many times daily (most often via our support@dameware.com account), you can be sure we will be able to respond to you quickly.

•  Online FAQ is available at http://www.dameware.com/faq.htm.

•  Online discussion group can be viewed at http://www.dameware.com/discuss.htm.

•  You can fax us at 504-626-1189.

•  You can contact us by phone at 504-626-7545 (recommended to be used as a last resort)

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, La.  70448


How to register
How To Order

For added convenience, you may order DGroup in any of the following ways:

♦	Visit our Web Site at http://www.dameware.com/northstar.htm to order online with your Visa, MasterCard or Discover credit card, fax your order, or order by telephone:

Online at http://www.dameware.com/northstar.htm
Faxed Orders at 1-785-539-3743
Phoned Orders  calls taken 10am - 8pm, EST, Monday-Friday
     1-800-699-6395 (From the USA only)
     1-785-539-3731

Be sure to reference product number #3015 when ordering from NorthStar.

0	Note: Any product or support questions should be sent to support@dameware.com.  NorthStar solutions is a purchase vendor only, for DameWare Development, and unable to answer any questions about our products!

♦	For quantity pricing, please contact DameWare Development at sales@dameware.com.

♦	If you prefer to pay by check, or money order please send order information to:

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, LA.  70448

♦	For payment by purchase order please send order information to address below, or fax to 504-626-1189:

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, LA.  70448

Note: NorthStar Solutions does NOT accept purchase orders.


What do I get when I register
What do I get when I order

There are no limitations in this shareware release, but you may encounter a "nag" screen from time to time.  Upon receipt of your order you will receive a license file which will remove the "nag" screen. The product will be registered in your name and you will receive the latest version.  It's a small price to pay for your peace of mind. You may also wish to check on our Web Home Page for the latest version which you have rights to use as a registered user.  Our Web Home Page address is:  http://www.dameware.com.


License Agreement

DGroup is not public domain or free software.

DGroup is copyrighted, and all rights are reserved by DameWare Development.

Licensing:

1. shareware version

You may use the shareware version of DGroup for up to 30 days in your design environment for evaluation purposes only. You may copy and distribute it freely as long as all the files in the package, including the demo programs are distributed with it and no changes or additions of any kind are made to the original package.

2. registered version

As a registered user, you can use DGroup in your design environment and you have a royalty-free right to distribute executables that use DGroup as a runtime component. Only registered users can distribute executables using DGroup.

You may copy the software to facilitate your use of it on as many computers as there are licensed users specified in the license file. Making copies for any other purpose violates international copyright laws. In particular, you are prohibited from distributing a registered version of DGroup, except as a runtime component of one of your applications.

The license file allows you to compile your applications with DGroup. You are not allowed to distribute the DGroup.LIC or DGroup.lpk license files with any application that you distribute.  You are allowed to distribute the DGroupR.LIC with your Windows Scripting Host script(s).

Disclaimer of Warranty:

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE SOLD "AS IS"  WITHOUT WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Good data processing procedure dictates that any program be thoroughly tested with non-critical data before relying on it.

The user must assume the entire risk of using the program.

Your use of this product indicates that you have read and agreed to these terms.


Installation

DameWare Group is distributed with a self-extracting installation wizard file - DGroupW.exe.  Once executed, DGroupW.exe will install the DGroup components into a directory of your choosing (c:\Program Files\DameWare\DGroup\ by default), and register the DGroup.dll component into the Windows system registry.

The following is a list of the files installed during the installation wizard process:

DGroup.DLL	32-bit ActiveX DLL Control

DGroup.HLP	On-line documentation

DGroup.CNT	Contents file for On-line documentation

DGroup.EXE	DGroup VB sample executable

DGroup.FRM	DGroup VB sample form

DGroup.VBP	DGroup VB sample project file

DGroup.ASP	DGroup Active Server Pages sample file

DGroup.HTM	DGroup Web page sample file

DGroup.VBS	DGroup Windows Scripting Host sample script

Once you have registered the DGroup component, you will receive the following license files:

DGroup.LIC	License file

DGroup.LPK	License file for web pages

DGroupR.LIC	License file for Windows Scripting Host

Distribution Note:

When you create and distribute applications that use DGroup, you can install the appropriate file in the customer's Microsoft Windows \SYSTEM subdirectory, or any specific directory as long as the component is registered to that subdirectory.

Note: You are not allowed to distribute the DGroup.LIC or DGroup.lpk license files with any application that you distribute. You are allowed to distribute the DGroupR.LIC file with your Windows Scripting Host script(s).


Using within a Web page.
Using in a Web page

DGroup ActiveX control can easily be used in a Web Page.  The following is a simple example.  You may also wish to visit sites such as Microsoft at (http://www.microsoft.com/workshop) or DameWare Development’s home page at (http://www.dameware.com).

<html>

<head>

<title>DGroup</title>

</head>

<body>

<p align="center">

<object ID="DGroupCtl1" < CLASSID="CLSID:5B494172-D2D9-11D1-A7C6-00C04FA30EBD"

codebase="dgroup.dll#Version=1,4,1,4" WIDTH="0" HEIGHT="0">

  <param name="Domain" value="">

</object>

<br>

<em><strong><big><big>DGroup</big></big></strong></em></p>

<div align="left">

<table border="0" width="80%" cellspacing="0" cellpadding="0">

  <tr>

    <td width="25%">Domain or Machine Name<br>

    <input type="TEXT" value name="frmDomain" size="27"></td>

    <td width="21%" valign="bottom" align="left"><input type="button" value="Get All Groups"

    name="BtnGetAllGroups"></td>

    <td width="22%" valign="bottom" align="left"></td>

    <td width="24%" valign="bottom" align="left"></td>

  </tr>

  <tr>

    <td width="25%">UserID<br>

    <input type="TEXT" value name="UserID" size="27"></td>

    <td width="21%" valign="bottom" align="left"><input type="button" value="Get User Groups"

    name="BtnGetUserGroups"></td>

    <td width="22%" valign="bottom" align="left"><input type="button" value="Is Member"

    name="BtnIsMember"></td>

  </tr>

  <tr>

    <td width="25%">Group<br>

    <input type="TEXT" value name="Group" size="27"></td>

    <td width="21%" valign="bottom" align="left"><input type="button" value="Get Group Users"

    name="BtnGetGroupUsers"></td>

    <td width="22%" valign="bottom" align="left"><input type="button" value="Add Global Group"

    name="BtnAddGlobalGroup"></td>

    <td width="24%" valign="bottom" align="left"><input type="button" value="Delete Group"

    name="BtnDeleteGroup"></td>

  </tr>

  <tr>

    <td width="25%">Group Comment<br>

    <input type="TEXT" value name="Comment" size="27"></td>

    <td width="21%" valign="bottom" align="left"><input type="button" value="Add Member"

    name="BtnAddMember"></td>

    <td width="22%" valign="bottom" align="left"><input type="button" value="Remove Member"

    name="BtnRemoveMember"></td>

    <td width="24%" valign="bottom" align="left"></td>

  </tr>

  <tr>

    <td width="25%">Connect UserID<br>

    <input type="TEXT" value name="conUserID" size="27"><br>

    Connect Password<br>

    <input type="password" value name="Password" size="27"></td>

    <td width="21%" valign="bottom" align="left"><input type="button" value="Connect User"

    name="BtnConnectUser"></td>

    <td width="22%" valign="bottom" align="left"><input type="button" value="Disconnect User"

    name="BtnDisconnectUser"></td>

    <td width="24%" valign="bottom" align="left"></td>

  </tr>

</table>

</div>

<p align="left"><textarea name="List1" rows="4" cols="60"></textarea></p>

<script language="VBSCRIPT">

frmDomain.value = DGroupCtl1.GetLocalMachineName

UserID.value = DGroupCtl1.GetCurrentUserID

Sub BtnGetAllGroups_OnClick()

List1.value = ""

DGroupCtl1.Domain = frmDomain.value

DGroupCtl1.SetFirstGroup

While DGroupCtl1.GroupGetNext <> 0

if List1.value = "" then

List1.value = DGroupCtl1.Group + Chr(9) + DGroupCtl1.GroupComment

else

List1.value = List1.value + chr(10) + DGroupCtl1.Group + Chr(9) + DGroupCtl1.GroupComment

end if

Wend

End Sub

Sub BtnGetUserGroups_OnClick()

List1.value = ""

DGroupCtl1.Domain = frmDomain.value

DGroupCtl1.UserID = UserID.value

DGroupCtl1.SetFirstUserGroup

While DGroupCtl1.UserGroupGetNext <> 0

if List1.value = "" then

List1.value = DGroupCtl1.Group

else

List1.value = List1.value + chr(10) + DGroupCtl1.Group

end if

Wend

End Sub

Sub BtnIsMember_OnClick()

DGroupCtl1.Domain = frmDomain.value

DGroupCtl1.UserID = UserID.value

DGroupCtl1.Group = Group.value

If DGroupCtl1.IsMember = 1 Then

    MsgBox "User " + DGroupCtl1.UserID + " Is Member of group " + Group.value

Else

    MsgBox "User " + DGroupCtl1.UserID + " Is NOT Member of group " + Group.value

End If

End Sub

Sub BtnGetGroupUsers_OnClick()

List1.value = ""

DGroupCtl1.Domain = frmDomain.value

DGroupCtl1.Group = Group.value

DGroupCtl1.SetFirstUser

While DGroupCtl1.UserGetNext <> 0

if List1.value = "" then

List1.value = DGroupCtl1.UserID

else

List1.value = List1.value + chr(10) + DGroupCtl1.UserID

end if

Wend

End Sub

Sub BtnAddGlobalGroup_OnClick()

DGroupCtl1.Domain = frmDomain.value

DGroupCtl1.Group = Group.value

DGroupCtl1.GroupComment = Comment.value

DGroupCtl1.GroupAdd

End Sub

Sub BtnDeleteGroup_OnClick()

DGroupCtl1.Domain = frmDomain.value

DGroupCtl1.Group = Group.value

DGroupCtl1.GroupDelete

End Sub

Sub BtnAddMember_OnClick()

DGroupCtl1.Domain = frmDomain.value

DGroupCtl1.UserID = UserID.value

DGroupCtl1.Group = Group.value

DGroupCtl1.GroupAddMember

End Sub

Sub BtnRemoveMember_OnClick()

DGroupCtl1.Domain = frmDomain.value

DGroupCtl1.UserID = UserID.value

DGroupCtl1.Group = Group.value

DGroupCtl1.GroupRemoveMember

End Sub

Sub BtnDisconnectUser_OnClick()

End Sub

Sub BtnConnectUser_OnClick()

DGroupCtl1.Domain = frmDomain.value

DGroupCtl1.ConnectUserID = conUserID.value

DGroupCtl1.ConnectPassword = Password.value

DGroupCtl1.UserConnect

End Sub

Sub BtnDisconnectUser_OnClick()

DGroupCtl1.Domain = frmDomain.value

DGroupCtl1.UserDisconnect

End Sub

</script>

</body>

</html>


Displays appropriate Copyright notices
Copyright

Copyright© 1998 DameWare Development

Portions of this product are Copyrighted (c) 1991-1998 by Microsoft Corporation.

All rights are reserved. All  Microsoft Corporation disclaimers apply.

DGroup is a trademark of DameWare Development.

Microsoft Windows is a registered trademark of Microsoft Corporation.

Microsoft Windows Scripting Host is a registered trademark of Microsoft Corporation.


Displays Properties
Properties

All the properties are listed below. Properties that apply only to

DGroup, or require special consideration when used with it,

are underlined. They are documented in this help file. See the

Visual Basic Language Reference or online Help for

documentation of the remaining properties.

(About)	(Name)
ConnectPassword	ConnectUserID
Domain	DragIcon
DragMode	Group
GroupComment	Height
HelpContextID	Index
LastError	Left
TabIndex	TabStop
Tag	ToolTipText
Top	UserID
Valid	Visible
WhatsThisHelpID	Width


Display the DGroup About box
(About) Property

Properties	Methods

Description

The (About) property will invoke the DameWare Group About box dialog.  This dialog is used to display the control’s registration information.

Syntax

DGroupCtl1.AboutBox

Notes

The About box dialog will be displayed in the Windows environment until the control is registered with the license file (DGroup.lic), or the Web environment with the license file (DGroup.lpk).


Specify the password for a UserID within the domain or machine.
ConnectPassword Property

Properties	Methods

Description

Specifies the password for an individual UserID account within a Windows NT Domain or Machine that will be used to connect to that domain or machine.

Syntax

DGroupCtl1.ConnectPassword = “mypassword”

Data Type

String

Example

Private Sub Form_Load()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.ConnectUserID = Text6.Text

DGroupCtl1.ConnectPassword = Text4.Text

DGroupCtl1.UserConnect

End Sub

See Also

ConnectUserID

Domain


Specify the UserID account to connect with within the domain or machine.
ConnectUserID Property

Properties	Methods

Description

Specifies the UserID account for an individual UserID within a Windows NT Domain or Machine that will be used to connect to that domain or machine.

Syntax

DGroupCtl1.ConnectUserID = “myuserid”

Data Type

String

Example

Private Sub Form_Load()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.ConnectUserID = Text6.Text

DGroupCtl1.ConnectPassword = Text4.Text

DGroupCtl1.UserConnect

End Sub

See Also

ConnectPassword

Domain


Specify domain or machine name.
Domain Property

Properties	Methods

Description

Specifies or returns the Windows NT Domain name or the Machine Name to use to display the global groups of.

Syntax

DGroupCtl1.Domain = "mydomain"

DGroupCtl1.Domain = "\\mymachine"

Data Type

String

Notes

When used to specify a machine name, you must prefix the entry with two backslashes (\\):

\\mymachine	for a machine with a name of ‘mymachine’

\\klingon	for a machine with a name of ‘klingon’

mydomain	for a domain with a name of ‘mydomain’

theworld.com	for a domain with a name of ‘theworld.com’

Example

Private Sub Form_Load()

‘ this example will set the domain name

Text1.Text = "mydomain"

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.ConnectUserID = Text6.Text

DGroupCtl1.ConnectPassword = Text4.Text

DGroupCtl1.UserConnect

End Sub

See Also

ConnectPassword

ConnectUserID


Specify the Global Group.
Group Property

Properties	Methods

Description

Specifies or returns the Windows NT Domain global group(s).

Syntax

DGroupCtl1.Group = “Domain Users”

Data Type

String

Example

Private Sub Form_Load()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.UserID = Text2.Text

DGroupCtl1.Group = Text3.Text

DGroupCtl1.GroupAddMember

End Sub

See Also

GroupComment


Specify the Global Group comment.
GroupComment Property

Properties	Methods

Description

Specifies or returns the Windows NT Domain global group comment.

Syntax

DGroupCtl1.GroupComment = “Add Domain Users”

Data Type

String

Example

Private Sub Form_Load()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.Group = Text3.Text

DGroupCtl1.GroupComment = Text5.Text

DGroupCtl1.GroupAdd

End Sub

See Also

Group


Returns the last system level error code trapped by DGroup.
LastError Property

Properties	Methods

Description

Retrieves or returns the last operating system or system level error code trapped by DGroup.

Syntax

MyLong = DGroupCtl1.LastError

Data Type

Long

Example

Sub OnErrorHandler()

MsgBox "Last error was " & DGroupCtl1.LastError

If Err.Number <> 0 Then

    MsgBox Err.Description, vbCritical, "Error"

End If

End Sub


Specify the UserID for a user within the domain or machine.
UserID Property

Properties	Methods

Description

Specifies or returns the UserID for an individual user within a Windows NT Domain or Machine.

Syntax

DGroupCtl1.UserID = “myID”

Data Type

String

Example

Private Sub Form_Load()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.UserID = Text2.Text

DGroupCtl1.Group = Text3.Text

If DGroupCtl1.IsMember = 1 Then

    MsgBox "User " + DGroupCtl1.UserID + " Is Member of group " + Text3.Text

Else

    MsgBox "User " + DGroupCtl1.UserID + " Is NOT Member of group " + Text3.Text

End If

End Sub

See Also

Group

Domain


Displays Methods
Methods

All of the methods are listed below. Methods that apply only to

DGroup, or require special consideration when used

with it, are underlined. They are documented in this help file.

See the Visual Basic Language Reference or online Help for

documentation of the remaining events.

GetCurrentUserID

GetLocalMachineName

GroupAdd

GroupAddMember

GroupDelete

GroupGetNext

GroupRemoveMember

IsMember

SetFirstGroup

SetFirstUser

SetFirstUserGroup

UserConnect

UserDisconnect

UserGetNext

UserGroupGetNext


Retrieve the current user account on the machine.
GetCurrentUserID Method

Properties	Methods

Description

Retrieve the current user account on the machine.

Syntax

Text2.Text = DGroupCtl1.GetCurrentUserID

Data Type

String

Example

Private Sub Command2_Click()

Text2.Text = DGroupCtl1.GetCurrentUserID

End Sub

See Also

GetLocalMachineName


Retrieve the local machine name.
GetLocalMachineName Method

Properties	Methods

Description

Retrieve the local machine name.

Syntax

Text1.Text = DGroupCtl1.GetLocalMachineName

Data Type

String

Example

Private Sub Command1_Click()

Text1.Text = DGroupCtl1.GetLocalMachineName

End Sub

See Also

GetCurrentUserID


Add a new global group to a domain or machine.
GroupAdd Method

Properties	Methods

Description

Add a new global group to a Windows NT Domain or machine.

Syntax

DGroupCtl1.GroupAdd

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.Group = Text3.Text

DGroupCtl1.GroupComment = Text5.Text

DGroupCtl1.GroupAdd

End Sub

See Also

GroupAddMember

GroupDelete

GroupGetNext

GroupRemoveMember

SetFirstUserGroup

UserGroupGetNext


Add a user account to an existing global group on a domain or machine.
GroupAddMember Method

Properties	Methods

Description

Add a specific user account to an existing global group on a Windows NT Domain or machine.

Syntax

DGroupCtl1.GroupAddMember

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.UserID = Text2.Text

DGroupCtl1.Group = Text3.Text

DGroupCtl1.GroupAddMember

End Sub

See Also

GroupAdd

GroupDelete

GroupGetNext

GroupRemoveMember

SetFirstUserGroup

UserGroupGetNext


Delete an existing global group from a domain or machine.
GroupDelete Method

Properties	Methods

Description

Delete an existing global group from a Windows NT Domain or machine.

Syntax

DGroupCtl1.GroupDelete

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.Group = Text3.Text

DGroupCtl1.GroupDelete

End Sub

See Also

GroupAdd

GroupAddMember

GroupRemoveMember


Advance to the next global group from a Windows NT Domain or machine..
GroupGetNext Method

Properties	Methods

Description

Advance sequentially to the next Global Group from a Windows NT Domain or machine.  Normally used in a program loop to retrieve a list of all the Global Groups on a Windows NT Domain or machine.

Syntax

While DGroupCtl1.GroupGetNext <> 0

Data Type

Boolean

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.SetFirstGroup

i = 0

While DGroupCtl1.GroupGetNext <> 0

    List1.AddItem DGroupCtl1.Group + Chr(9) + DGroupCtl1.GroupComment

    i = i + 1

    Label6.Caption = "Count: " + Str(i)

    Label6.Refresh

Wend

End Sub

See Also

GroupAdd

GroupAddMember

GroupDelete

GroupRemoveMember

SetFirstUserGroup

UserGroupGetNext


Remove a user account from an existing global group on a domain or machine.
GroupRemoveMember Method

Properties	Methods

Description

Remove a specific user account from an existing global group on a Windows NT Domain or machine.

Syntax

DGroupCtl1.GroupRemoveMember

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.UserID = Text2.Text

DGroupCtl1.Group = Text3.Text

DGroupCtl1.GroupRemoveMember

End Sub

See Also

GroupAdd

GroupAddMember

GroupDelete

GroupGetNext

SetFirstUserGroup

UserGroupGetNext


Determine if a user account is a member of an existing global group on a domain or machine.
IsMember Method

Properties	Methods

Description

Determine if a specific user account is a member of an existing global group on a Windows NT Domain or machine.

Syntax

DGroupCtl1.IsMember

Data Type

Boolean

Notes

IsMember returns “-1” for True.

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.UserID = Text2.Text

DGroupCtl1.Group = Text3.Text

If DGroupCtl1.IsMember = -1 Then

    MsgBox "User " + DGroupCtl1.UserID + " Is Member of group " + Text3.Text

Else

    MsgBox "User " + DGroupCtl1.UserID + " Is NOT Member of group " + Text3.Text

End If

End If

End Sub

See Also

GroupAdd

GroupAddMember

GroupDelete

GroupGetNext

SetFirstUserGroup

UserGroupGetNext


Specify to DGroup to set the first found global group as the default.
SetFirstGroup Method

Properties	Methods

Description

Specify to DGroup to search for and set the first found Global Group as the default group to gather group comments and user members for.  This method is typically used in a loop where you would retrieve all of the Global Groups on a Windows NT Domain or machine.

Syntax

DGroupCtl1.SetFirstGroup

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.SetFirstGroup

i = 0

While DGroupCtl1.GroupGetNext <> 0

    List1.AddItem DGroupCtl1.Group + Chr(9) + DGroupCtl1.GroupComment

    i = i + 1

    Label6.Caption = "Count: " + Str(i)

    Label6.Refresh

Wend

End Sub

See Also

SetFirstUser

SetFirstUserGroup

GroupGetNext


Specify to DGroup to set the first found user in a specified global group as the default.
SetFirstUser Method

Properties	Methods

Description

Specify to DGroup to search for and set the first user found within the specified Global Group as the default user.  This method is typically used in a loop where you would retrieve all of the users contained within the specified Global Group on a Windows NT Domain or machine.

Syntax

DGroupCtl1.SetFirstUser

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.Group = Text3.Text

DGroupCtl1.SetFirstUser

i = 0

While DGroupCtl1.UserGetNext <> 0

    List1.AddItem DGroupCtl1.UserID

    i = i + 1

    Label6.Caption = "Count: " + Str(i)

    Label6.Refresh

Wend

End Sub

See Also

SetFirstGroup

SetFirstUserGroup

UserGetNext


Specify to DGroup to set the first found user in a specified user group as the default.
SetFirstUserGroup Method

Properties	Methods

Description

Specify to DGroup to search for and set the first user found within the specified User Group as the default user.  This method is typically used in a loop where you would retrieve all of the users contained within the specified User Group on a Windows NT Domain or machine.

Syntax

DGroupCtl1.SetFirstUserGroup

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.UserID = Text2.Text

DGroupCtl1.SetFirstUserGroup

i = 0

While DGroupCtl1.UserGroupGetNext <> 0

    List1.AddItem DGroupCtl1.Group

    i = i + 1

    Label6.Caption = "Count: " + Str(i)

    Label6.Refresh

Wend

End Sub

See Also

SetFirstGroup

UserGetNext

UserGroupGetNext


Establish a network connection with a specific user account.
UserConnect Method

Properties	Methods

Description

Establish a network connection with a specific user account to a Windows NT Domain or machine.

Syntax

DGroupCtl1.UserConnect

Notes

This method is useful if authentication to a specific Windows NT Domain or machine requires a different user account than the currently connected user.  This way a Help Desk individual could use a special account to perform user/group maintenance.

The currently connected user will remain connected when another user connection (or connections) is established.  Use the UserDisconnect method to disconnect any previously connected users.

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.ConnectUserID = Text6.Text

DGroupCtl1.ConnectPassword = Text4.Text

DGroupCtl1.UserConnect

End Sub

See Also

UserDisconnect


Disconnect a network connection with a specific user account.
UserDisconnect Method

Properties	Methods

Description

Disconnect a network connection with a specific user account to a Windows NT Domain or machine.

Syntax

DGroupCtl1.UserDisconnect

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.UserDisconnect

End Sub

See Also

UserConnect


Retrieve the next user in a specified global group.
UserGetNext Method

Properties	Methods

Description

Retrieve the next user account in a specified Windows NT Domain or machine, within a specified global group.  This method is typically used in a loop where you would retrieve all of the users contained within the specified global group on a Windows NT Domain or machine.

Syntax

While DGroupCtl1.UserGetNext <> 0

Data Type

Boolean

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.Group = Text3.Text

DGroupCtl1.SetFirstUser

i = 0

While DGroupCtl1.UserGetNext <> 0

    List1.AddItem DGroupCtl1.UserID

    i = i + 1

    Label6.Caption = "Count: " + Str(i)

    Label6.Refresh

Wend

End Sub

See Also

SetFirstGroup

SetFirstUser

UserGetNext


Retrieve the next user in a specified user group.
UserGroupGetNext Method

Properties	Methods

Description

Retrieve the next user account in a specified Windows NT Domain or machine, within a specified user group.  This method is typically used in a loop where you would retrieve all of the users contained within the specified user group on a Windows NT Domain or machine.

Syntax

While DGroupCtl1.UserGroupGetNext <> 0

Data Type

Boolean

Example

Private Sub Command1_Click()

DGroupCtl1.Domain = Text1.Text

DGroupCtl1.UserID = Text2.Text

DGroupCtl1.SetFirstUserGroup

i = 0

While DGroupCtl1.UserGroupGetNext <> 0

    List1.AddItem DGroupCtl1.Group

    i = i + 1

    Label6.Caption = "Count: " + Str(i)

    Label6.Refresh

Wend

End Sub

See Also

SetFirstGroup

SetFirstUser

SetFirstUserGroup

UserGetNext

UserGroupGetNext